# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Semyon Maryasin <marsoft@ya.ru>

pkgname=z
pkgver=1.11
pkgrel=2
pkgdesc="Tracks your most used directories, based on 'frecency'"
arch=('any')
url="https://github.com/rupa/z/"
license=('WTFPL')
depends=('bash')
source=("$pkgname-$pkgver.tar.gz::https://codeload.github.com/rupa/$pkgname/tar.gz/v$pkgver")
sha256sums=('873761c2eaf283c526b87ef272c8c35f70e94ea079fbbc985ba32070638ff963')
install=z.install

package() {
	cd "$srcdir/$pkgname-$pkgver"

	# update path in manpage
	sed -i z.1 -e "s:/path/to/z.sh:/usr/share/$pkgname/z.sh:g"
	install -Dm 644 z.1 "$pkgdir/usr/share/man/man1/z.1"

	install -Dm 644 z.sh "$pkgdir/usr/share/$pkgname/z.sh"
}
